const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
  title: 'Marmat',
  tagline: '基于IOC模式搭配Devexpress控件实现的一套WinForm平台下的低代码开发平台。',
  url: 'https://your-docusaurus-test-site.com',
  baseUrl: '/',
  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'warn',
  favicon: 'img/logo.png',
  organizationName: '无锡元珑软件科技有限公司', // Usually your GitHub org/user name.
  projectName: 'Marmat', // Usually your repo name.
  themeConfig: {
    prism: {
      additionalLanguages: ["powershell", "visual-basic", "csharp", "sql"],
      // theme: require('prism-react-renderer/themes/vsDark'),
      // theme: lightCodeTheme,
      // darkTheme: darkCodeTheme,
    },  
    navbar: {
      title: 'Marmat 低码平台',
      logo: {
        alt: 'Marmat Logo',
        src: 'img/logo.png',
      },
      items: [
        {
          type: 'doc',
          docId: 'intro',
          position: 'left',
          label: '文档',
        },
        {to: '/blog', label: '博客', position: 'left'},
        {
          to: "docs/upgrade",
          activeBasePath: "docs/upgrade",
          label: "更新日志✨",
          position: "left",
        },
        {
          href: 'https://gitee.com/marmat/marmat',
          label: 'Gitee',
          position: 'right',
        },
      ],
    },
    footer: {
      style: 'dark',
      links: [
        {
          title: '文档',
          items: [
            {
              label: '开发文档',
              to: '/docs/intro',
            },{
              label: '更新日志',
              to: '/docs/upgrade',
            },
          ],
        },
        {
          title: 'Community',
          items: [
            {
              label: 'Stack Overflow',
              href: 'https://stackoverflow.com/questions/tagged/docusaurus',
            },
            {
              label: 'Discord',
              href: 'https://discordapp.com/invite/docusaurus',
            },
            {
              label: 'Twitter',
              href: 'https://twitter.com/docusaurus',
            },
          ],
        },
        {
          title: 'More',
          items: [
            {
              label: 'Blog',
              to: '/blog',
            },
            {
              label: 'Gitee',
              href: 'https://gitee.com/marmat/marmat',
            },
          ],
        },
      ],
      copyright: `Copyright © ${new Date().getFullYear()} Marmat, Inc. Built with 无锡元珑软件科技有限公司.`,
    },
  },
  presets: [
    [
      '@docusaurus/preset-classic',
      {
        docs: {
          sidebarPath: require.resolve('./sidebars.js'),
          // Please change this to your repo.
          editUrl:
            'https://gitee.com/marmat/marmat/',
        },
        blog: {
          showReadingTime: true,
          // Please change this to your repo.
          editUrl:
            'https://gitee.com/marmat/marmat/doc/',
        },
        theme: {
          customCss: require.resolve('./src/css/custom.css'),
        },
      },
    ],
  ],
};
